package marlon.sjf;

public class CommandExecutors {
	private static final CommandExecutor JAVA_EXECUTOR = new JavaCommandExecutor();
	
	public static int execute(Command cmd) {
		if (cmd.name.equals("java")) {
			return JAVA_EXECUTOR.execute(cmd);
		}
		throw new SJFException(SJFErrorCode.COMMAND_NOT_FOUND);
	}
}
